<?php
/**
 * Created by PhpStorm.
 * User: ageng
 * Date: 2018/7/19
 * Time: 9:41
 */

namespace App\Services;


use App\Facades\Infra\StoreGoodsManager;
use App\Facades\Infra\StoreLevelManager;


class ConvenienceStoreService
{
    //获取便利店的所有栏目信息
    public function getStoreLevels($conditions)
    {
        return StoreLevelManager::getStoreLevels($this->formatConditions($conditions), true)->get();
    }

    //获取便利店某栏目的所有商品信息
    public function getStoreGoods($conditions)
    {
        return StoreGoodsManager::getStoreGoods($this->formatConditions($conditions), true, ['storeLevel'])->get();
    }



//    private function formatConditions($conditions){
//        $conditions['hotel_id'] = \Auth::user()->id;
//
//        return $conditions;
//    }
}